conventional function call
Function calls invoke functions that perform some action and possibly return a value.   Functions are called by naming them, and passing arguments between the parentheses following the function name:

  time$ = GimmeTime$ ( format )
  SetTimeGMT ( currentGMT )

computed function call
Computed function calls work like computed GOSUBs , except a function is called, not a subroutine.  Return type and argument types are specified for FUNCADDR variables when they are declared.  Function calls through FUNCADDR variables work like conventional function calls, except the address of the called function is taken from the FUNCADDR variable.  The syntax for declaring FUNCADDR variables is:

  [ scopeName ] FUNCADDR [ returnTypeName ] funcaddrVariable ( typeNameList )
  [ scopeName ] FUNCADDR [ returnTypeName ] funcaddrArray[] ( typeNameList )

When a function is called through a FUNCADDR variable, the value returned by the called function is the data type specified in the declaration statement.  The called function also expects to receive arguments as specified in the declaration statement.   The compiler normally makes sure the arguments and return type of functions assigned to FUNCADDR variables and arrays are compatible with their declarations.   The compiler also makes sure the correct number of arguments is supplied in the invocation, and uses the declaration to type-convert arguments as necessary.  Several computed function calls are shown below:

  @funcVar ()
  j = @funcVar (n)
  @funcArray[i] (x#, y#)
  k = @funcArray[i] (i, j, k)

@funcVar() calls the function whose address is in variable funcVar.  @funcArray[x](n) calls the function whose address is in element x of array funcArray[] .  If funcVar or funcArray[x] is zero, no function is called, a return value of zero is simulated, and execution continues with the next statement.  FUNCADDR variables can be tested for zero with conventional test statements like IF.

  IF (funcArray[n]) THEN
    j = @funcArray[n] (arg1, arg2)
  ELSE
    j = -1
  END IF

The FUNCADDRESS() intrinsic, or & address operator, returns function addresses which can be loaded into FUNCADDR variables and arrays as follows:

  funcVar = &FuncName()
  funcVar = FUNCADDRESS (FuncName())
  subArray[i] = &FuncName()
  subArray[i] = FUNCADDRESS (FuncName())

Computed function calls are especially efficient when one of several functions must be called based on a variable or condition. For example, the following computed function call to execute one of eight functions whose addresses are in funcAction[] depending on a 3-bit field in variable token:

  result = @funcAction [token{3,29}] ()